import React, { ReactNode } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { history } from 'umi'

type Props = {
    children: ReactNode
}

export default function index({ children }: Props) {
    return (
        <div className='pageCard'>
            {
                history.location.pathname === "/article/edit"? <PageHeaderWrapper title="编辑"/>: <PageHeaderWrapper/>
            }
            
            { children }
        </div>
    )
}